/**
 * 
 */
package reit.driver;

import org.apache.log4j.Logger;

import reit.ass3.AbstractAssetsWithDamagedAssetsStorage;
import reit.ass3.Management;
import reit.ass3.Parser;

/**
 * @author Mordechai
 *
 */
public class Driver {

	public static void main(String[] args) {
		Logger fLogger = Logger.getLogger(Driver.class);
		fLogger.info("Creating Management");
		if (args.length<4){
			fLogger.error("some file was wrong");
			return;
		}
		Management management = new Management(Parser.createClerks(args[0]),
				(AbstractAssetsWithDamagedAssetsStorage) Parser.createAssets(args[2]),
				Parser.createRepairTools(args[0]),
				Parser.createRepairMaterials(args[0]),
				Parser.createAssetContentsRepairToolDetails(args[3]),
				Parser.createAssetContentsRepairMaterialDetails(args[3]), 
				Parser.createCustomerGroupDetails(args[1]),
				Parser.getNumberOfRentalRequests(args[0]),
				Parser.getNumberOfMaintenancePersons(args[0]));
		fLogger.info("Starting Simulation");
		management.startSim();
		fLogger.info("Simulation End");
	}

}
